/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package group2assignone.model;

import group2assignone.dao.MyDAO;
import group2assignone.ucm.UCStartup;

/**
 *
 * @author Natalie
 */
public class Ticket extends TicketComponent
{
    private String flightNum;
    private String username;
    private int bookingNum;
   
    
    public Ticket(String flightNum, String username)
    {
        this.flightNum = flightNum;
        this.username = username;
    }

    public void bookTicket(String bookingNum)
    {
        System.out.println("Ticket booked for:"+username + ". Flight: " + flightNum);
        MyDAO coms = UCStartup.getInstance().getDAO();
        coms.sQLMakeBooking(this, bookingNum);
    }

    public double getCost()
    {
        double cost = 0;
        return cost;
    }

    /**
     * @return the gST
     */
   

//    public void setFlightNum(String flightNum)
//    {
//        this.flightNum = flightNum;
//    }
//
//    public String getFlightNum()
//    {
//        return flightNum;
//    }
//
//    public void setUsername(String user)
//    {
//        username = user;
//    }
//
//    public String getUsername()
//    {
//        return username;
//    }
}
